package com.promise.jokerdream.utils

import android.content.Context
import android.content.SharedPreferences

object IncognitoPreferenceManager {
    private const val PREF_NAME = "incognito_settings"
    private const val KEY_INCOGNITO_ENABLED = "incognito_enabled"

    private fun getPreferences(context: Context): SharedPreferences {
        return context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE)
    }

    fun isIncognitoEnabled(context: Context): Boolean {
        return getPreferences(context).getBoolean(KEY_INCOGNITO_ENABLED, false)
    }

    fun setIncognitoEnabled(context: Context, enabled: Boolean) {
        getPreferences(context).edit().putBoolean(KEY_INCOGNITO_ENABLED, enabled).apply()
    }
}

